@ECHO OFF
SET BatchPath=%~dp0
SET ExecPath=

CALL:ParseOptions %*

IF NOT DEFINED ExecPath (
  FOR /F %%i IN (%BatchPath:~0,-1%\.devsettings) DO (
    CALL:ParseOptions %%i
  )
)

%ExecPath% -s stop -p %BatchPath:~0,-1%
GOTO:EOF

:ParseOptions
IF NOT "%1" == "" (

  IF /I [%1] == [--exec]  SET ExecPath=%~2

  SHIFT & SHIFT
  GOTO:ParseOptions
)
GOTO:EOF

:EOF